home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-23 | 6.3 KB | 219 lines | [TEXT/MPS ] |
- #include "Types.r"
- #include "OCETemplates.h"
- #include "OCE.r"
-
- #define kCollectionAspect (kDETFifthID + (3 * kDETIDSep))
- #define kCollectionInfoPage (kDETFifthID + (4 * kDETIDSep))
-
- #define kGeneva 3
- #define kPalatino 16
- #define kSystemFont 0
-
- // Page layout defines:
-
- #define iconColumnWidth 16
- #define nameColumnWidth 132
- #define kindColumnWidth 86
- #define spaceBetweenColumns 2
-
- #define iconColumnLeft 0
- #define iconColumnRight (iconColumnLeft + iconColumnWidth)
- #define nameColumnLeft (iconColumnRight + spaceBetweenColumns)
- #define nameColumnRight (nameColumnLeft + nameColumnWidth)
- #define kindColumnLeft nameColumnRight
- #define kindColumnRight (kindColumnLeft + kindColumnWidth)
-
- #define sublistIconTop (-7)
- #define sublistIconBottom (9)
- #define sublistTextTop (-6)
- #define sublistTextBottom (8)
- #define sublistTitleTop 35
- #define sublistTitleBottom (sublistTitleTop+12)
-
- #define windowHeight 280
- #define windowWidth (kindColumnLeft+kindColumnWidth+15+16)
-
- #define sublistTopBound (sublistTitleBottom+2)
- #define sublistBottomBound (windowHeight-12)
- #define sublistLeftBound 12
- #define sublistRightBound (windowWidth-12)
-
- #define kPageBitmapLeft (11)
- #define kPageBitmapRight (kPageBitmapLeft+16)
- #define kPageBitmapTop 7
- #define kPageBitmapBottom 23
-
-
-
- // Here's an example using a single aspect as both
- // the main aspect and the info page aspect
- resource 'deta' (kCollectionAspect, purgeable) {
- 0, // Drop priority
- dropCheckConflicts, // Drop check flag
- isMainAspect // Is the main aspect
- };
-
- resource 'rstr' (kCollectionAspect+kDETTemplateName, purgeable) {
- "Album Collection Aspect"
- };
-
- resource 'rstr' (kCollectionAspect+kDETRecordType, purgeable) {
- "Album Collection"
- };
-
- resource 'rstr' (kCollectionAspect+kDETAspectKind, purgeable) {
- "album collection"
- };
-
- resource 'rstr' (kCollectionAspect+kDETAspectWhatIs, purgeable) {
- "Album Collection\n\nA collection of albums."
- };
-
- resource 'rstr' (kCollectionAspect+kDETAspectAliasKind, purgeable) {
- "album collection alias"
- };
-
- resource 'rstr' (kCollectionAspect+kDETAspectAliasWhatIs, purgeable) {
- "Album Collection alias\n\This is an alias to a collection of albums."
- };
-
- resource 'rst#' (kCollectionAspect+kDETAspectCategory,purgeable)
- {{
- "Recordings"
- }};
-
- resource 'detw' (kCollectionAspect+kDETAspectInfoPageCustomWindow, purgeable) {
- { 0, 0, windowHeight, windowWidth },
- discludePopup
- };
-
- resource 'detv' (kCollectionAspect+kDETAspectInfoPageCustomWindow, purgeable)
- {
- {
- {6, kPageBitmapRight+8, 25, kPageBitmapRight+8+166}, kDETNoFlags, kDETInfoPageNumber,
- Menu {kSystemFont, 12, kDETLeft, kDETNormal, "", kDETInfoPageNumber, kDETInfoPageNumber };
- };
- };
-
- resource 'rstr' (kCollectionAspect+kDETAspectNewMenuName, purgeable) {
- "New Album Collection"
- };
-
- resource 'rstr' (kCollectionAspect+kDETAspectNewEntryName, purgeable) {
- "untitled album collection"
- };
-
- include "AlbumCollectionIcons" 'ICN#'(0) as 'ICN#'(kCollectionAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumCollectionIcons" 'icl4'(0) as 'icl4'(kCollectionAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumCollectionIcons" 'icl8'(0) as 'icl8'(kCollectionAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumCollectionIcons" 'ics#'(0) as 'ics#'(kCollectionAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumCollectionIcons" 'ics4'(0) as 'ics4'(kCollectionAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumCollectionIcons" 'ics8'(0) as 'ics8'(kCollectionAspect+kDETAspectMainBitmap, purgeable);
- include "AlbumCollectionIcons" 'SICN'(0) as 'SICN'(kCollectionAspect+kDETAspectMainBitmap, purgeable);
-
-
- resource 'rstr' (kCollectionAspect+kDETAspectDragInString, purgeable) {
- "Do you want to add %3%“^3”%the selected items% to *0x/the/* ^1 “^2”?"
- };
-
- resource 'rst#' (kCollectionAspect+kDETAspectRecordCatDragIn,purgeable)
- {{
- "Recordings", kMemberAttrTypeBody
- }};
-
- resource 'rst#' (kCollectionAspect+kDETAspectAttrDragIn,purgeable)
- {{
- "", kMemberAttrTypeBody, kMemberAttrTypeBody
- }};
-
- resource 'dett' (kCollectionAspect+kDETAspectLookup, purgeable)
- {{
- {kMemberAttrTypeBody}, typePackedDSSpec,
- notForInput, notForOutput, useInSublist, isAlias, isNotRecordRef,
- {};
- }};
-
- resource 'detm' (kCollectionAspect+kDETAspectViewMenu, purgeable)
- {
- kCollectionAspect+kDETAspectViewMenu,
- {
- kDETPrName, "by Name";
- kDETPrKind, "by Kind";
- }
- };
-
-
-
-
-
-
-
-
- // The info-page:
-
- #define k2ndColumnRightInset (kDETRecordInfoWindWidth-kDETSubpageRightInset)
-
-
- resource 'deti' (kCollectionInfoPage, purgeable) {
- 1000,
- {sublistTopBound, sublistLeftBound, sublistBottomBound, sublistRightBound},
- noSelectFirstText,
- {
- kDETNoProperty, kDETNoProperty, kCollectionInfoPage;
- },
- {
- kDETNoProperty, kDETNoProperty, kCollectionInfoPage + 1;
- }};
-
- resource 'rstr' (kCollectionInfoPage+kDETTemplateName, purgeable) {
- "Album Collection Info Page"
- };
-
- resource 'rstr' (kCollectionInfoPage+kDETRecordType, purgeable) {
- "Album Collection"
- };
-
- resource 'rstr' (kCollectionInfoPage+kDETInfoPageName, purgeable) {
- "Album Collection"
- };
-
- resource 'rstr' (kCollectionInfoPage+kDETInfoPageMainViewAspect, purgeable) {
- "Album Collection Aspect"
- };
-
- resource 'detv' (kCollectionInfoPage, purgeable)
- {
- {
- {kPageBitmapTop, kPageBitmapLeft, kPageBitmapBottom, kPageBitmapRight}, kDETNoFlags, kDETAspectMainBitmap,
- Bitmap { kDETSmallIcon };
-
- {sublistTopBound-1, sublistLeftBound-1, sublistBottomBound+1, sublistRightBound+1}, kDETNoFlags, kDETNoProperty,
- Box { kDETUnused };
-
- {sublistTitleTop, sublistLeftBound+nameColumnLeft, sublistTitleBottom, sublistLeftBound+nameColumnRight},
- kDETNoFlags, kDETPrName,
- StaticCommandTextFromView { kGeneva, 9, kDETLeft, kDETUnderline, "Name", kDETChangeViewCommand, -1 };
-
- {sublistTitleTop, sublistLeftBound+kindColumnLeft, sublistTitleBottom, sublistLeftBound+kindColumnRight},
- kDETNoFlags, kDETPrKind,
- StaticCommandTextFromView { kGeneva, 9, kDETLeft, kDETNormal, "Kind", kDETChangeViewCommand, -2 };
- };
- };
-
- resource 'detv' (kCollectionInfoPage + 1, purgeable)
- {
- {
- {sublistIconTop, iconColumnLeft, sublistIconBottom, iconColumnRight},
- kDETHilightIfSelected, kDETAspectMainBitmap,
- Bitmap { kDETMiniIcon };
-
- {sublistTextTop, nameColumnLeft, sublistTextBottom, nameColumnRight},
- kDETHilightIfSelected + kDETDynamicSize, kDETPrName,
- StaticText { kGeneva, 9, kDETLeft, kDETIconStyle };
-
- {sublistTextTop, kindColumnLeft, sublistTextBottom, kindColumnRight},
- kDETNoFlags, kDETPrKind,
- StaticText { kGeneva, 9, kDETLeft, kDETNormal };
- }
- };
-